package jonctions;

import java.util.ArrayList;

import rail.Rail;

public class JonctionSimple extends Jonction {

	public JonctionSimple(int id) {
		super.id = id;
		super.listRail = new ArrayList<Rail>();
		for (int i = 0; i < 2; i++) {
			Rail rail = new Rail(id + i);
			rail.setJonction2(this);
			super.listRail.add(rail);
		}
		System.out.println("La JonctionSimple numero" + super.id + " a ete creee");
	}

	public JonctionSimple(int id, Rail r1, Rail r2) {
		super.id = id;
		super.listRail = new ArrayList<Rail>();
		r1.setJonction2(this);
		r2.setJonction2(this);
		super.listRail.add(r1);
		super.listRail.add(r2);
		System.out.println("La JonctionSimple numero" + super.id + " a ete creee");
	}

}
